use crate::cljcell::clj_cell::CljCell;
use crate::built_in_functions::my_clojure_interp::{CljFunc, CljRecur};
use std::collections::HashMap;
use crate::Rc;

pub struct my_util;

impl my_util {

    pub fn is_symbol(cell: &CljCell) -> bool {
        if let CljCell::Symbol(vs) = cell {
            return true;
        }
        return false;
    }

    pub fn is_symbol_rc(cell: Rc<CljCell>) -> bool {
        if let CljCell::Symbol(vs) = &*cell {
            return true;
        }
        return false;
    }

    pub fn is_percent(cell: &CljCell) -> bool {
        if let CljCell::Percent(vs) = cell {
            return true;
        }
        return false;
    }

    pub fn is_percent_rc(cell: Rc<CljCell>) -> bool {
        if let CljCell::Percent(vs) = &*cell {
            return true;
        }
        return false;
    }

    pub fn is_bracket(cell: &CljCell) -> bool {
        match cell {
            CljCell::BracketClj(vs) => return true,
            _ => return false
        }
    }

    pub fn is_bracket_rc(cell: Rc<CljCell>) -> bool {
        match &*cell {
            CljCell::BracketClj(vs) => return true,
            _ => return false
        }
    }

    pub fn is_clj_list(cell: &CljCell) -> bool {
        if let CljCell::CljList(vs) = cell {
            return true;
        }
        return false;
    }

    pub fn is_clj_list_rc(cell: Rc<CljCell>) -> bool {
        if let CljCell::CljList(vs) = &*cell {
            return true;
        }
        return false;
    }
}